class Person {
  //如果不赋初值 则需要延迟初始化
  late String name;
  late int age;

  Person(String name, int age) {
    this.age = age;
    this.name = name;
  }

  String getPersonInfo() {
    return "${this.name}---${this.age}";
  }
}

void main() {
  var p = new Person("张三", 20);
  print(p.getPersonInfo());
}
